﻿using Gallery.Datas.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Threading.Tasks;

namespace Gallery
{
	/// <summary>
	/// 货币基金收益服务接口。
	/// </summary>
	[ServiceContract(Name = "MoneyFundIncome")]
	public interface IMoneyFundIncomeService
	{
		/// <summary>
		/// 获取所有货币基金的最新收益。
		/// </summary>
		/// <returns></returns>
		[WebGet(UriTemplate="LatestIncomes")]
		List<MoneyFundIncome> GetLatestIncomes();

		/// <summary>
		/// 获取某个货币基金的历史收益。
		/// </summary>
		/// <param name="code">基金代码。</param>
		/// <param name="pageSize">每页记录数。</param>
		/// <param name="pageIndex">获取页索引。</param>
		/// <returns></returns>
		[WebGet(UriTemplate = "LatestIncomes?code={code}&pageSize={pageSize}&pageIndex={pageIndex}")]
		List<MoneyFundIncome> GetIncomes(String code, int pageSize, int pageIndex);
	}
}
